package myJni;

import entity.Entity;
import jdk.nashorn.internal.parser.JSONParser;
import sun.plugin.javascript.JSObject;
import wrapper.LambdaWrapper;

import java.util.*;

/**
 * <ul>
 * <li>Title: HelloWorld</li>
 * <li>Description: TODO </li>
 * </ul>
 *
 * @author swc
 * @date 2021/5/8 0008 下午 17:29
 */
public class HelloWorld {

    //获取电脑的名称
    public native String getComputeName();

    //获取字符串
    public native String getString(String info);


    static {

        System.loadLibrary("TestJNI");//载入本地库
    }


    public static void main(String[] args) {
        long start = System.currentTimeMillis();
        String string  = new HelloWorld().getString("test");
        //String computerName  = new HelloWorld().getComputeName();

        /*Map<String, String> map = System.getenv();
        String userName = map.get("USERNAME");// 获取用户名
        String computerName = map.get("COMPUTERNAME");// 获取计算机名
        String userDomain = map.get("USERDOMAIN");// 获取计算机……*/

        long end = System.currentTimeMillis();
        System.out.println("耗时:"+(end-start)+"毫秒");
       // String str1  = new HelloWorld().getString();

        //System.out.println("----"+computerName);

    }

}
